George Oldroyd's book The Technique and Spirit of Fugue is the best book on fugue composition but it's out of print and VERY expensive. So, by default, Kent Kennan's book is the best reference book a composer can buy for a basic overview of counterpoint. If you already have a year or two of music theory (you know about modulations, sonata forms, and basic part-writing) you can,literally, just start working from this book with Bach as a companion text and start teaching yourself how to write fugues.
Kennan's book is helpful because while mostly covering Baroque counterpoint he covers the topic in a way that lets a student expand on the contrapuntal principles into other styles. If you're going to get just one book on counterpoint make this the book.