Fix a bug to count number of splitted workspaces.  Refs #6650.