Removed extraneous dict.keys() usage in len()