Patrick Button clambers down a muddy ditch and into a clump of trees between a playing field and the busy Chippenham bypass. It’s the kind of place you wouldn’t notice, never mind call home. But this was where Button, 43, first tasted life without a roof above his head, one of an uncounted population of hidden homeless in Britain’s rural areas and small towns.

Button worked as a carer and shared a two-bedroom home with a long-term partner. When she died suddenly, he lost the house, and within weeks he found himself shifting a rotting badger’s carcass to make room for his tent on the outskirts of the Wiltshire town. He cooked food over an open fire with a boot scraper improvised for a grill. He quickly learned of the hostility homeless people can face. He came back one day to find his tent and possessions, including a picture of his late partner, burnt to ashes, apparently on purpose.

The prosperous town, 10 miles from Bath, is in a county that claims to have only 22 rough sleepers, down from 33 last year. These figures will be sent to central government and used to help determine homelessness policy, but they may well underestimate the scale of the problem. In London and Manchester tents fill shop doorways, but in the countryside the homeless are elusive, sleeping, like Button, in woods, or in vans, bin sheds and on river banks. They are hard to count.

Wiltshire, like other councils, tallies its rough sleepers once a year. The latest snapshot was taken last month and in Chippenham they found three. Since May, Chippenham’s homeless hostel, Unity House, said it had looked after 46 at-risk or current rough sleepers.

The county trumpeted its figures as evidence it was getting on top of the problem. Richard Clewer, a cabinet member for housing, said it was “such good news”. But people in Chippenham who have been living the cold, fitful, anxious life of the rough sleeper were sceptical.

Brian Tubb, Billy Gifford and Patrick Button. Photograph: Linda Nylind/The Guardian

“I know there are more than that in Swindon alone,” said Button. “There are hundreds [across the county]. To say [22] means they are not doing their homework.”

“People are keeping out of the way,” added his friend Billy Gifford, 50, a farm worker who lived among trees on the opposite bank of the Avon river to Button. “There were 30 to 40 people in the park in Chippenham some days in the summer.”

The council opens extra beds for rough sleepers in the winter, and some search for a temporary sofa to sleep on, which explains why there are fewer visible at this time of year. But people like Faye, sleeping in a bin shed, and John, alone in a woodland on the outskirts of the town, are likely to have been missed.

Counted or not, the hardship of rough sleeping remains a fact of life. Unresolved personal trauma, bereavement, relationship breakdown and addiction lie, to one extent or another, in the past of every homeless person the Guardian spoke to. A simple lack of housing was often a problem too. Evictions and the refusal of private landlords to take tenants on housing benefit were common.

Several said they had presented themselves as homeless to the council but had waited weeks and sometimes months to be offered accommodation, which often turned out to be just a place in the town’s hostel. A derelict police station on the edge of the town centre frustrated many: surely places like that could be turned into a shelter. And now they face a new problem: universal credit.

There was Brian Tubb, 48, a former manager at a car plant, who slept in his van in lay-bys and quiet car parks for six months after he fell out with his family over his addiction to fixed odds betting terminals, which he calls “the worst things ever invented”. He is friends with Faye, 32, who sometimes sleeps alone in a disused bin store as she struggles with beating heroin addiction and serious mental health problems. And then there is Corine, 38, a heroin-addicted hairdresser who has been sleeping rough in a tent and in an underpass since she was given seven days’ notice to leave her private rented home of six years because the landlord wanted to sell.

“I am in a trap,” she said. “This is the worst time of my life. It is Christmas and I am living in a tent.”

Savannah. Photograph: Linda Nylind/The Guardian

Unity House is a lifeline in Chippenham and the council has recently funded 10 extra winter spaces, which has helped get some people off the streets. But some people find the shared dorms and the residents’ drug and alcohol use difficult. Avoiding that was one reason Faye said she slept in a bin shed. She didn’t want to show the Guardian its location in case other people found it and has fitted her own padlock.

Homelessness seems to suck people down. After Button’s partner’s family forced him out of their home, he tried to continue his work as a carer, but it couldn’t last. He sofa-surfed for a week but when the council had no home for him and he couldn’t rent privately (too expensive and landlords were reluctant to accept housing benefit claimants), he pitched his tent.

“I had been made homeless within hours,” he said.

Some of Chippenham’s homeless seem intensely vulnerable. Savannah, 19, has been sofa surfing after being kicked out by her mother over a disagreement about her boyfriend. She has autism and ADHD and said being homeless left her feeling “all over the place”.

John, 20, a slight young man, arrived at Unity last week after 10 days camping in a wood north of Chippenham after a court ordered him out of his home. He had been charged with attacking his mother’s boyfriend. He wrapped himself in four layers of clothing and a foil blanket but couldn’t keep warm. He said it was so horrible he considered taking all of his medication at once.

“They don’t care up at the council,” he said. “They said they would have to come and see the tent before they would do anything, but then they didn’t.”

Connor, 23, arrived last week straight from sleeping in a Swindon car park after a spell in jail for theft and actual bodily harm, crimes committed to feed his heroin addiction. In September he asked Wiltshire council for help with housing, but said he received nothing, until now.

“It was a dark existence,” he said.

Michael. Photograph: Linda Nylind/The Guardian

A council spokesperson said: “Occasionally if we can’t verify people are sleeping rough through the usual channels, we will agree a time to meet up and see where they have been sleeping … It is sometimes difficult to meet up with some people due to their lifestyles and it can be a challenging group to work with as it takes time to build trust.”

Wiltshire has a council housing waiting list of 1,719 people. It is not alone among rural authorities in suffering a shortage of affordable homes. Only 8% of the housing stock in rural areas in the UK is affordable, compared with 20% in urban areas, according to the IPPR. Studies have shown that as many as half of the affordable homes councils require to be built in new rural developments are not met when housing developers argue they would not be sufficiently profitable.

For all that, heroin and alcohol undermine recovery for some of Chippenham’s homeless. Others are clean but still face considerable obstacles.

Local charities such as the Doorway Project can be a lifeline for the homeless. Photograph: Linda Nylind/The Guardian

Tubb, now living in Unity after his months in a van and free of his gambling habit, still begs because his monthly universal credit benefit payment is just £210, or £7 a day. After he has bought food he doesn’t always have enough to feed his electricity metre, so his flat is dark and cold and his food rots when the fridge goes off.

Wiltshire is a pilot area for welfare reform and Tubb’s payment is so low because he is paying the government back for a loan he had to take because of the six-week delay in making his first payment. He wants to get back to work, but is still dealing with mental health problems.

“All you have to do is make one or two slip-ups and you will be in the doorway somewhere,” he said.

While local charities such as Doorway and churches provide free lunches and breakfasts, some local people display violent hostility.

“Teenagers are the ones who are going to do you most damage,” said Button. “They call you druggy and smackhead and tramps.”

Gifford became homeless after his marriage broke down and he served a spell in jail for drink driving.

“You get spat at,” he said. “One bloke chucked a tub of salted peanuts over me and lobbed a can at me. What is that about?”

The police, like everybody else, see them as someone else’s problem, he said. “They are often trying to push us away, saying they will get rid of us,” he said. “We keep getting moved on.”

Additional reporting: Esther Addley