This question is pretty vague.
Guest posting can be useful in some situations.
Guest posting just to get a link is no of value and should be avoided.
Paying to have guest posts to get a link is also not valuable and should be avoided.
There are many many people selling services to offer guest posts.
This is clearly a violation of search engines terms of service and while it may provide some short term gain it is a good way to get a penalty in the long run.
Also - there really isn't an optimum number of words. You can benchmark against the competition of your target keyword. It is more important to match search and SERP intent than hit an "optimum" number of words.