# File lib/nmap/parser.rb, line 374
        def numservices(type = "")
                total = 0

                @scaninfo.each do |info|
                        if type.empty?
                                total += info.numservices
                        elsif info.type == type
                                return info.numservices
                        end
                end

                total
        end