Setting up ajax database query for stock count