We consider a matching problem in a bipartite graph G=(A boolean OR B,E)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G = (A \cup B, E)$$\end{document} where vertices in A rank their neighbors in a strict order of preference while vertices in B are allowed to have weak rankings, i.e., ties are allowed in their rankings. Stable matchings always exist in G and are easy to find, however popular matchings need not exist in G and it is NP-complete to decide if one exists. This motivates the "approximately popular" matching problem. A well-known measure of approximate popularity is low unpopularity factor. We show that when each tie in G has length at most k, there always exists a stable matching whose unpopularity factor is at most k and such a matching can be computed in polynomial time. Thus when ties have bounded length, there always exists a near-popular stable matching. This can be considered to be a generalization of Gardenfors' result (1975) which showed that when rankings are strict, every stable matching is popular. We then extend our result to the hospitals/residents setting, i.e., vertices in B have capacities. There are several applications where the size of the matching is its most important attribute. When ties are one-sided and of length at most k, we show a polynomial time algorithm to find a maximum matching whose unpopularity factor within the set of maximum matchings is at most 2k.