1 verses of the King James Version have both "if" and "sand".
Psalms 139:18 If I should count them, they are more in number than the sand: when I awake, I am still with thee.
In other translations: WEB ASV YLT Darby Webster DRC Geneva