public static function assertCount($expectedCount, $haystack, $message = '')
{
if (!is_int($expectedCount)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer');
}
if (!$haystack instanceof Countable && !$haystack instanceof Traversable && !is_array($haystack)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'countable or traversable');
}
static::assertThat($haystack, new PHPUnit_Framework_Constraint_Count($expectedCount), $message);
}