adding count_all method to count the number of rows in a given entity table