public static function fetchReverseRelatedObjectsCount($objectID, $attributeID, $allRelations, $ignoreVisibility)
 {
     if (!is_numeric($objectID)) {
         eZDebug::writeError("\$objectID is missing or invalid", __METHOD__);
         return false;
     }
     $object = eZContentObject::fetch($objectID);
     if (!$object instanceof eZContentObject) {
         eZDebug::writeError("An error occured fetching object #{$objectID}", __METHOD__);
         return false;
     }
     $params = array();
     if (isset($ignoreVisibility)) {
         $params['IgnoreVisibility'] = $ignoreVisibility;
     }
     if (!$attributeID) {
         $attributeID = 0;
     }
     if (isset($allRelations)) {
         if ($attributeID && !$allRelations) {
             $params['AllRelations'] = eZContentFunctionCollection::contentobjectRelationTypeMask(array('attribute'));
         } elseif ($allRelations === true) {
             $attributeID = false;
         } else {
             $params['AllRelations'] = eZContentFunctionCollection::contentobjectRelationTypeMask($allRelations);
         }
     }
     if ($attributeID && !is_numeric($attributeID) && !is_bool($attributeID)) {
         $attributeID = eZContentObjectTreeNode::classAttributeIDByIdentifier($attributeID);
         if (!$attributeID) {
             eZDebug::writeError("Can't get class attribute ID by identifier");
             return false;
         }
     }
     return array('result' => $object->reverseRelatedObjectCount(false, $attributeID, $params));
 }