Calculates the number of steps.

@return the number of steps
344915
public int getNumberOfSteps() {
		int result = 0;

		final Queue<TraceStep> queue = new LinkedList<>();
		queue.add(root);

		while (!queue.isEmpty()) {
			final TraceStep currentTraceStep = queue.poll();

			result++;

			final List<TraceStep> children = currentTraceStep.getChildren();
			if (!children.isEmpty()) {
				queue.addAll(children);
			}
		}

		return result;
	}
597521
public int getNumberOfSuccessors() {

		int numberOfSuccessors = 0;

		for (int i = 0; i < this.outputGates.length; ++i) {
			numberOfSuccessors += this.outputGates[i].getNumberOfEdges();
		}

		return numberOfSuccessors;
	}
250303
public static function isLastStep()
    {
        $n = self::classNameNumber();
        $n1 = $n + 1;
        $class = str_replace($n, $n1, get_called_class());
        return !class_exists($class);
    }
210599
public MaterialStep getCurrentStep() {
        if (currentStepIndex > getWidgetCount() - 1 || currentStepIndex < 0) {
            return null;
        }
        Widget w = getWidget(currentStepIndex);
        if (w instanceof MaterialStep) {
            return (MaterialStep) w;
        }
        return null;
    }
1336624
public int getTopNCorrectCount() {
        if (confusion == null)
            return 0;
        if (topN <= 1) {
            int nClasses = confusion().getClasses().size();
            int countCorrect = 0;
            for (int i = 0; i < nClasses; i++) {
                countCorrect += confusion().getCount(i, i);
            }
            return countCorrect;
        }
        return topNCorrectCount;
    }
1275174
public int incrementCount() {
        // get the logging recursion stack depth for the current thread
        int depth = stackDepth.get();
        depth = depth + 1;
        stackDepth.set(depth);
        return depth;
    }
885691
public int size() {
        int count=0;
        for(Value val: map.values())
            count+=val.count();

        return count;
    }
701172
protected function calculateActionCount()
    {
        $counter = 0;
        foreach ($this->actions as $actions) {
            $counter += count($actions);
        }

        return $counter;
    }
928796
public final int getLiveSegmentCount() {
        int num = 0;

        for (int i = 0; i < _segList.size(); i++) {
            if (_segList.get(i) != null)
                num++;
        }

        return num;
    }
1328440
public int getNumberOfPredecessors() {

		int numberOfPredecessors = 0;

		for (int i = 0; i < this.inputGates.length; ++i) {
			numberOfPredecessors += this.inputGates[i].getNumberOfEdges();
		}

		return numberOfPredecessors;
	}
884917
public int numKeys() {
        int result = basic.numKeys();
        if (chains != null)
            for (DeterministicKeyChain chain : chains)
                result += chain.numKeys();
        return result;
    }
670722
public int getTotalLeased(){
		int total=0;
		for (int i=0; i < this.partitionCount && this.partitions[i] != null; i++){
			total+=this.partitions[i].getCreatedConnections()-this.partitions[i].getAvailableConnections();
		}
		return total;
	}
1027826
public int numberOfElements() {
        int n = 0;
        for (SortedSet<Integer> cell : cells) {
            n += cell.size();
        }
        return n;
    }
1186620
private int getPreviousStep(int currentStep) {
        int prevStep = -1;

        // we find the next available step.
        for (int i = currentStep - 1; i >= STEP_LOGIN; i--) {
            if(isStepEnabled(i)) {
                prevStep = i;
                break;
            }
        }

        return prevStep;
    }
136678
private int countTiles(int widthInTile, int step, int s)
    {
        int count = 0;
        for (int tx = 0; tx < widthInTile; tx++)
        {
            for (int ty = 0; ty < map.getInTileHeight(); ty++)
            {
                if (map.getTile(tx + s * step, ty) != null)
                {
                    count++;
                }
            }
        }
        return count;
    }
1245183
def num_time_steps(self):
    """"""

    num_time_steps = sum(t.num_time_steps for t in self.trajectories)
    return num_time_steps + self.num_completed_time_steps
960662
public int next() {
        int curIndex = _index;
        // Compute the next index.
        if( _index >= 0 ) {
            int i = _state.length - 1;

            while( i >= 0 ) {
                _index += _sum[i];
                if( ++_state[i] < _ranges[i] )
                    break;
                _index -= _sum[i] * _ranges[i];
                _state[i] = 0;
                i--;
            }

            if( i == -1 )
                _index = -1;
        }
        // Return the current index.
        return curIndex;
    }