package net.mccarroll; public class WordCount { public static int count(String args[]) { int total = 0; for(String arg:args) { total += arg.split(" ").length; } return total; } }