public function count(IlluminateModel $model)
    {
        // If model does not implement the CounterCacheable
        // interface, we'll jump ship and abort.
        if (! $model instanceof CounterCacheable) {
            Log::error(sprintf('[%s] Model [%s] does not implement CounterCacheable.', __CLASS__, get_class($model)));
            throw new NotCounterCacheableException(sprintf('Model [%s] does not implement CounterCacheable.', __CLASS__, get_class($model)));
        }

        // Retrieve array of available counter caches
        $counterCaches = (array) $model->counterCaches();

        // Validate counter caches
        if (empty($counterCaches)) {
            Log::error(sprintf('[%s] No counter caches found on model [%s].', __CLASS__, get_class($model)));
            throw new NoCounterCachesFoundException(sprintf('No counter caches found on model [%s].', __CLASS__, get_class($model)));
        }

        // Handle each available counter caches
        foreach ($counterCaches as $counterCacheColumnName => $relations) {
            // Since an available counter cache could be found
            // in multiple tables, we'll need to support multiple relations.
            foreach ((array) $relations as $relationName => $counterCacheConditions) {
                // Sometimes our counter cache might require additional conditions
                // which means, we need to support both scenarios
                $relationName = ! is_array($counterCacheConditions) ? $counterCacheConditions : $relationName;

                // When we've figured out the name of our relation
                // we'll just make a quick validation, that it actually exists
                if (! method_exists($model, $relationName)) {
                    Log::error(sprintf('[%s] Relation [%s] was not found on model [%s]', __CLASS__, $relationName, get_class($model)));
                    throw new RelationNotFoundException(sprintf('Relation [%s] was not found on model [%s]', __CLASS__, $relationName, get_class($model)));
                }

                // Retrieve relation query builder
                $relation = $model->{$relationName}();

                // Update the count value for counter cache column
                $this->updateCount($model, $relation, $counterCacheConditions, $model->getAttribute($relation->getForeignKey()), $counterCacheColumnName);

                // If our model's foreign key has been updated,
                // we need to update the counter cache for the previous value as well
                if (! is_null($model->getOriginal($relation->getForeignKey())) && $model->getOriginal($relation->getForeignKey()) != $model->getAttribute($relation->getForeignKey())) {
                    // Retrieve original foreign key
                    $originalForeignKey = $model->getOriginal($relation->getForeignKey());

                    // Re-instantiate model and fill it with original foreign key
                    $reModel = $model->newInstance([$relation->getForeignKey() => $originalForeignKey]);

                    // Update the count value for for counter cache column
                    $this->updateCount($reModel, $reModel->{$relationName}(), $counterCacheConditions, $originalForeignKey, $counterCacheColumnName);
                }
            }
        }

        return true;
    }