nextIncrement as Replacement for int function findFirstAvailableIdInRelevantTable($table, $ownerId, $relevantMetric)