build/rekord.js
function(properties)
  {
    if ( !isValue( properties ) )
    {
      return this.length;
    }

    var resolver = createPropertyResolver( properties );
    var result = 0;

    for (var i = 0; i < this.length; i++)
    {
      var resolved = resolver( this[ i ] );

      if ( isValue( resolved ) )
      {
        result++;
      }
    }

    return result;
  }
function(properties)
  {
    if ( !isValue( properties ) )
    {
      return this.length;
    }

    var resolver = createPropertyResolver( properties );
    var result = 0;

    for (var i = 0; i < this.length; i++)
    {
      var resolved = resolver( this[ i ] );

      if ( isValue( resolved ) )
      {
        result++;
      }
    }

    return result;
  }
function ( properties ) { if ( ! isValue ( properties ) ) { return this . length ; } var resolver = createPropertyResolver ( properties ) ; var result = 0 ; for ( var i = 0 ; i < this . length ; i ++ ) { var resolved = resolver ( this [ i ] ) ; if ( isValue ( resolved ) ) { result ++ ; } } return result ; }
Counts the number of elements in this collection that has a value for the
given property expression.

```javascript
var c = Rekord.collect([{age: 2}, {age: 3}, {taco: 4}]);
c.count('age'); // 2
c.count('taco'); // 1
c.count(); // 3
```

@method
@memberof Rekord.Collection#
@param {propertyResolverInput} [properties] -
The expression which converts one value into another.
@return {Number} -
The number of elements that had values for the property expression.
@see Rekord.createPropertyResolver
@see Rekord.isValue
Counts the number of elements in this collection that has a value for the given property expression .