Since you really want to count members of table2, make that your main query...
var query = new Parse.Query("Table2");
The thing you want to count is table2 elements that are associated with table1 elements such that the table1 element matches some criterion...
var innerQuery = new Parse.Query("Table1");
innerQuery.equalTo("someKey", "someValue"); // some criterion
query.matchesQuery("table2ID", innerQuery);
Now, get a count....
query.count().then(count => /* do something if count > X? */);
It's important that the data is setup properly for this:
When initializing table2 elements, you need to place real references to table1 objects (not just strings representing ids).
myTable1Object = // whatever
myTable2Object.set("table2ID", myTable1Object.id); // WRONG
myTable2Object.set("table2ID", myTable1Object); // correct
I think the made-up names you used in your question might also add some confusion. A real pointer to table1 is better called "table1". That is, not table2 (which is the table where it appears) and no "ID" suffix which implies it violates point #1 above.