public function seeNumElementsInCollection($collection, $expected, $criteria = [])
    {
        $collection = $this->driver->getDbh()->selectCollection($collection);
        $res = $collection->count($criteria);
        \PHPUnit\Framework\Assert::assertSame($expected, $res);
    }
public function seeNumElementsInCollection($collection, $expected, $criteria = [])
    {
        $collection = $this->driver->getDbh()->selectCollection($collection);
        $res = $collection->count($criteria);
        \PHPUnit\Framework\Assert::assertSame($expected, $res);
    }
public function seeNumElementsInCollection ( $ collection , $ expected , $ criteria = [ ] ) { $ collection = $ this -> driver -> getDbh ( ) -> selectCollection ( $ collection ) ; $ res = $ collection -> count ( $ criteria ) ; \ PHPUnit \ Framework \ Assert :: assertSame ( $ expected , $ res ) ; }
Count number of records in a collection

``` php
<?php
$I->seeNumElementsInCollection('users', 2);
$I->seeNumElementsInCollection('users', 1, array('name' => 'miles'));
```

@param $collection
@param integer $expected
@param array $criteria
Count number of records in a collection