Zsh, 32 bytes
echo ${(wf)#S} ${(w)#S} $[$#S+1]
Using Zsh parameter expansion flags. (f)
splits a string on newlines. (w)
counts 'words' in a string;an array (or #string); usually space delimited, but with (s)
or (f)
flags the 'words' can be delimited by other separators. And finally $#S
counts the bytes in string S
, but omits the terminating null byte so I had to add 1
to match the result from wc
.