tentei usar o metodo countElements e reportou o seguinte erro:
Playground execution failed: MyPlayground.playground:9:9: error: 'countElements' has been renamed to count println(countElements(name!)) ^~~~~ count Swift.countElements:1:36: note: 'countElements' has been explicitly marked unavailable here @availability(*, unavailable) func countElements(x: T) -> T.Index.Distance
Porém ao tentar usar o método cont(variável), ocorreu tudo certo.
Creio que o Xcode tenha mudado o nome do método para count.