Fix #128: Division by Zero while Calculate number of metadata and images

Calculate average values only if counted objects are greater then zero.