entity counter to db_models