There is a new SDK for the Azure tables service, you can install it from pip with the command pip install azure-data-tables. The new SDK can target either a storage account or a cosmos account. Here is a sample of how you can find the total number of entities in a table. You will have to iterate through each entity because the new Tables SDK uses paging on calls for query_entities and list_entities. Entities are turned in an ItemPaged which only returns a subset of the entities at a time.
from azure.data.tables import TableClient, TableServiceClient
connection_string = "<your_conn_str>"
table_name = "<your_table_name>"
with TableClient.from_connection_string(connection_string, table_name) as table_client:
f = "value gt 25"
query = table_client.query_entities(filter=f)
count = 0
for entity in query:
count += 1
print(count)
If you can clarify why you need the number of entities in a query I might be able to give better advice.
(Disclaimer, I work on the Azure SDK for Python team)