Update generics.py

while param page_size = 0, only return the count of the results, it is useful when we just wanna query the records count