get count of commands without duplication