If the tables are related, this is very simple, you can see the below-given suggestion:
Number of Table2 rows = COUNTROWS(RELATEDTABLE(Table2))
Then you can add a Calculated Column to Table1 which counts the times each item appears in Table2:
Number of Table 2 rows: COUNTROWS(RELATEDTABALE(Table2))
If the tables are not related, you can use CALCULATE and FILTER:
Number of Table2 rows =
CALCULATE(
COUNTROWS(Table2),
FILTER(
Table2,
Table2[Column1] = Table1[Column1]
)
)