public void ViewCountAndCrowdSize(AbstractApi api )
	{
		Search info = new Search();
		info.Init();
		String tag = api.MainTag;
		try 
		{
			String qTable = tag + "questions_table";
			String aTable = tag + "answers_table";
			info.CreateTemporaryTable(tag, qTable);
			info.CreateTemporaryRelatedTable(tag, aTable, qTable);
			
			Connection conn = info.getConnection();
			Statement s = conn.createStatement();
			
			FileWriter fstream = new FileWriter("C:\\method_output.txt");
			PrintWriter out = new PrintWriter(fstream);
			out.println("class,method,accepted,viewCountSum,scoreSum,answerCountSum,commentCountSum,favoriteCountSum,questions");
//			WordDistributions wd = new WordDistributions();
			for( PackageElem pack : api.Packages )
			{
				System.out.println("Package: " + pack.Name);
				int counter = 0;
				for( ClassElem klass : pack.Classes )
				{
//					if (wd.WordLength(klass.Name) == 1) {
//						continue;
//					}
					System.out.println("Class: " + klass.Name + " (" + ++counter + "/" + pack.Classes.size() + ")");
					for (MethodElem methodElem : klass.Methods) 
					{
						List<Integer> methodQuestionIds = info.GetIds(qTable, methodElem.Name);
					
						int acceptedAnswers = 0;
						int viewCounts = 0;
						int scores = 0;
						int answerCounts = 0;
						int commentCounts = 0;
						int favoriteCounts = 0;
					
						for( int id : methodQuestionIds )
						{
							ResultSet question = s.executeQuery(
									"SELECT * FROM POSTS " +
											"WHERE Id = " + id
									);

							while (question.next()) {
								if (question.getInt("AcceptedAnswerId") > 0) {
									acceptedAnswers++;
								}
								viewCounts += question.getInt("ViewCount");
								scores += question.getInt("Score");
								answerCounts += question.getInt("AnswerCount");
								commentCounts += question.getInt("CommentCount");
								favoriteCounts += question.getInt("FavoriteCount");
							}
						}
						out.print(pack.Name + ":" + klass.Name + "," + methodElem.Name + ",");
						out.print(acceptedAnswers + ",");
						out.print(viewCounts + ",");
						out.print(scores + ",");
						out.print(answerCounts + ",");
						out.print(commentCounts + ",");
						out.print(favoriteCounts + ",");
						out.print(methodQuestionIds.size());
						out.println("");
						out.flush();
					}
				}
			}
			out.close();
		} 
		catch (SQLException e) 
		{
			e.printStackTrace();
		}
		
		catch (IOException ioe) 
		{
			ioe.printStackTrace();
		}
		
		info.Close();
	}