Count Operation for Database