buildman: Create a function to get number of built commits

Move this code into a function. This removes the last pylint error in
the control module.

Signed-off-by: Simon Glass <sjg@chromium.org>
1 file changed