Make sure where object is built for count/destroyAll

/to @ritch 

The PR makes sure the where object is converted to MongoDB query.

See https://github.com/strongloop/loopback/issues/248