'return a SELECT COUNT generated against this
:class:`.TableClause`.'

@util.dependencies('sqlalchemy.sql.functions')
def count(self, functions, whereclause=None, **params):

    if self.primary_key:
        col = list(self.primary_key)[0]
    else:
        col = list(self.columns)[0]
    return Select([functions.func.count(col).label('tbl_row_count')], whereclause, from_obj=[self], **params)
