Yeah, it is always
an fhaid is "as long as; as far as; while", i.e., lenited
in Connemara (
so why is fad marked "masculine" in the dictionary? 
).
Cén fhaid is ... ? works as the question "how long ?".
It stumped me when I first heard a man from Gaoth Dobhair ask me "
Cá fhad ?" as it just sounded like
Cad ?.
Also said in Connacht are
cáid (
cá fhaid) and
caideó (
cá fhaid ó):
Caideó tháinig tú anseo ? "How long have you been here?"
Cáid ó tháinig tú thart sa gcoirnéal seo ? "How long have you been in this neck of the woods?"
But the past of the verb is used in that case.
Cá fhaid/Cáid go ... ? "How long till ... ?"
Cá fhaid/Cáid (+ an (interrogative)) ... ? "How long do/will, etc. ... ?"
Another way is using
achar, as in
cén t-achar:
Cén t-achar atá tú anseo ? "How long are you here ?"
I was taught from several sources that
ag foghlaim na Gaeilge is more usual than
ag foghlaim Gaeilge.
(Crossed with Bríd

)